package com.gaox.order;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;

import com.gaox.arouter.annotation.ARouter;
import com.gaox.arouter.annotation.Parameter;
import com.gaox.arouter.api.ParameterManager;
import com.gaox.arouter.api.RouterManager;
import com.gaox.common.utils.Cons;

@ARouter(path = "/order/OrderActivity")
public class OrderActivity extends AppCompatActivity {


    @Parameter
    String username;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_order);
//        new OrderActivity$$Parameter().loadParameter(this);
        ParameterManager.getInstance().loadParameter(this);
        Log.e(Cons.TAG, "接收参数值：" + username);
    }


    public void jumpApp(View view) {
        RouterManager.getInstance()
                .build("/app/MainActivity")
                .withResultString("call", "I'am comeback!")
                .navigation(this);
        //返回带onActivityForResult 带bundle用 withResultString
    }

    public void jumpPersonal(View view) {
        RouterManager.getInstance()
                .build("/personal/Personal_MainActivity")
                .withString("name", "simon")
                .navigation(this);
    }
}
